package org.zuel.huhuForum.util;



import java.util.Date;
import java.util.TimeZone;

public class DateUtil {
    public static  Date nowTime(){
//        LocalDateTime localDateTime = LocalDateTime.now();
//        Date date = Date.from(localDateTime.atZone(ZoneOffset.ofHours(8)).toInstant());;
        TimeZone tz = TimeZone.getTimeZone("Asia/Shanghai");
        TimeZone.setDefault(tz);
        return new Date();

    }

    public static void main(String[] args) {
        System.out.println(nowTime());
    }
}
